package com.henu.acmrating.pojo;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;

@ToString
@NoArgsConstructor
@Data
public class Problem {
    private Integer id;

    /**
     * 外键
     */
    private Integer userId;

    /**
     * oj的名字
     */
    private String ojName;

    /**
     * 运行id
     */
    private String runId;

    private String problemId;

    private String problemUrl;

    /**
     * 提交时间
     */
    private Date submitTime;

    /**
     * 提交状态
     */
    private String submitStatus;

    /**
     * 提交语言
     */
    private String submitLanguage;

    /**
     * 消耗内存
     */
    private String runMemory;

    /**
     * 消耗时间
     */
    private String runTime;

    public Problem(Integer userId, String ojName, String runId, String problemId, String problemUrl, Date submitTime, String submitStatus, String submitLanguage, String runMemory, String runTime) {
        this.userId = userId;
        this.ojName = ojName;
        this.runId = runId;
        this.problemId = problemId;
        this.problemUrl = problemUrl;
        this.submitTime = submitTime;
        this.submitStatus = submitStatus;
        this.submitLanguage = submitLanguage;
        this.runMemory = runMemory;
        this.runTime = runTime;
    }

    @Override
    public String toString() {
        return "Problem{" +
                "id=" + id +
                ", userId=" + userId +
                ", ojName='" + ojName + '\'' +
                ", runId='" + runId + '\'' +
                ", problemId='" + problemId + '\'' +
                ", problemUrl='" + problemUrl + '\'' +
                ", submitTime=" + submitTime +
                ", submitStatus='" + submitStatus + '\'' +
                ", submitLanguage='" + submitLanguage + '\'' +
                ", runMemory='" + runMemory + '\'' +
                ", runTime='" + runTime + '\'' +
                '}';
    }
}